package com.infore.airsupervise.bean;

import com.chad.library.adapter.base.entity.AbstractExpandableItem;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.infore.airsupervise.adapter.DispatchAqiExpendAdapter;

import java.util.List;

/**
 * 实时调度-气象数据-扩展列表实体类
 * <p>
 * 作者: dingxinlin
 * 创建日期: 2017/8/21 10:36
 */

public class DispatchWeatherExpandE
        extends AbstractExpandableItem<DispatchWeatherExpandE.FactorTrendE>
        implements MultiItemEntity {

    public DispatchWeatherExpandE() {
    }

    public DispatchWeatherExpandE(String staName, DispatchWeatherE.WeatherBean nearData) {
        this.staName = staName;
        this.nearData = nearData;
    }

    // 站点名称
    public String staName;

    // 最新的一条数据
    public DispatchWeatherE.WeatherBean nearData;

    @Override
    public int getLevel() {
        return 0;
    }

    @Override
    public int getItemType() {
        return DispatchAqiExpendAdapter.TYPE_LEVEL_0;
    }

    /**
     * 空气因子趋势实体类
     */
    public static class FactorTrendE extends BaseEntity implements MultiItemEntity {

        public FactorTrendE(List<DispatchWeatherE.WeatherBean> dataList) {
            this.dataList = dataList;
        }

        // 最近数据集合
        public List<DispatchWeatherE.WeatherBean> dataList;

        @Override
        public int getItemType() {
            return DispatchAqiExpendAdapter.TYPE_LEVEL_1;
        }
    }
}
